package homework.homework01;

public class Test {
    public static void main(String[] args) {
        //1.利用无参构造创建项目经理的对象
        Manager manager = new Manager();
        manager.setName("陈平安");
        manager.setWorkId("小镇001");
        manager.setSalary(10000.99);
        manager.setBonus(1000);

        //输出
        System.out.println(manager.toString());
        //调用重写的work
        manager.work();

        //2.利用带参构造器创建对象
        Programmer programmer = new Programmer("宁姚","小镇0002",15000);
        //调用work方法
        programmer.work();

        //调用toString()方法
        System.out.println(programmer.toString());
    }
}
